import request from "@/utils/request";

//分页查询
/* export const queryPageApi = (data) => {
  return request.get("/depts", { params: data });
};   简化成下边的 */
export const queryPageApi = (data) => request.get("/depts", { params: data });

//添加部门
export const addDeptApi = (data) => request.post("/depts", data);

//根据id查询回显
export const queryByIdApi = (id) => request.get(`/depts/${id}`);

//修改部门
export const updateDeptApi = (data) => request.put("/depts", data);

//删除部门
export const deleteDeptApi = (id) => request.delete(`/depts/${id}`);
